package com.material.factory.service.impl;

import java.util.Arrays;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.material.factory.mapper.FactoryFuelMapper;
import com.material.factory.domain.FactoryFuel;
import com.material.factory.service.IFactoryFuelService;

/**
 * 工厂燃料品名Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-05-07
 */
@Service
public class FactoryFuelServiceImpl implements IFactoryFuelService 
{
    @Autowired
    private FactoryFuelMapper factoryFuelMapper;

    /**
     * 查询工厂燃料品名
     * 
     * @param id 工厂燃料品名主键
     * @return 工厂燃料品名
     */
    @Override
    public FactoryFuel selectFactoryFuelById(Long id)
    {
        return factoryFuelMapper.selectFactoryFuelById(id);
    }

    /**
     * 查询工厂燃料品名列表
     * 
     * @param factoryFuel 工厂燃料品名
     * @return 工厂燃料品名
     */
    @Override
    public List<FactoryFuel> selectFactoryFuelList(FactoryFuel factoryFuel)
    {
        return factoryFuelMapper.selectFactoryFuelList(factoryFuel);
    }

    /**
     * 新增工厂燃料品名
     * 
     * @param factoryFuel 工厂燃料品名
     * @return 结果
     */
    @Override
    public int insertFactoryFuel(FactoryFuel factoryFuel)
    {
        return factoryFuelMapper.insertFactoryFuel(factoryFuel);
    }

    /**
     * 修改工厂燃料品名
     * 
     * @param factoryFuel 工厂燃料品名
     * @return 结果
     */
    @Override
    public int updateFactoryFuel(FactoryFuel factoryFuel)
    {
        return factoryFuelMapper.updateFactoryFuel(factoryFuel);
    }

    /**
     * 批量删除工厂燃料品名
     * 
     * @param ids 需要删除的工厂燃料品名主键
     * @return 结果
     */
    @Override
    public int deleteFactoryFuelByIds(Long[] ids)
    {
        //return factoryFuelMapper.deleteFactoryFuelByIds(ids);
        return factoryFuelMapper.updateByIds(Arrays.asList(ids));
    }

    /**
     * 删除工厂燃料品名信息
     * 
     * @param id 工厂燃料品名主键
     * @return 结果
     */
    @Override
    public int deleteFactoryFuelById(Long id)
    {
        return factoryFuelMapper.deleteFactoryFuelById(id);
    }

    @Override
    public int updateByIds(List<Long> ids) {
        return factoryFuelMapper.updateByIds(ids);
    }
}
